<template>
  <div class="code-box">
    <h3 class="code-box-title">6. Suspense组件的使用</h3>
    <Suspense loading="Loading.2.." fallback="加载中....">
      <SuspenseChild></SuspenseChild>
    </Suspense>
    <!-- <Suspense>
      <template #default>
        默认加载组件
      </template>
      <template #fallback>
        加载中的效果....
      </template>
    </Suspense> -->
  </div>
</template>

<script lang='ts' setup>
import SuspenseChild from '@/components/SuspenseChild.vue';


</script>

<style scoped lang='scss'>
.code-box {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 20px;
  min-height: 50px;

  &-title {
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
  }
}
</style>
